<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<script>
    function share_twitter(content,pid){
        var msg="test 123 with % symbol";
        msg = msg.replace("%","%25");
        window.open('http://twitter.com/home?status='+msg,'twitter test','status=0,width=620,height=350,top=0,left=0');
                                
        
    }
</script>

<a href="javascript:share_twitter()">Test 123</a>